<%@ page import="dao.IUserDao" %>
<%@ page import="dao.impl.UserDaoImpl" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/4/4
  Time: 11:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
   String name=request.getParameter("username");
   String pwd=request.getParameter("password");

    IUserDao iud=new UserDaoImpl();
    if(iud.register(name,pwd)>0){

        out.print("<script>alert('注册成功');location.href='login.html';</script>");
    }else {
        out.print("<script>alert('注册失败,请查看!');location.href='reg.html';</script>");
    }


%>

</body>
</html>
